import { App } from 'antd';

/**
 * 获取 Ant Design 的 message API
 * 使用 useApp hook，支持 React 18 并发模式
 */
export const useMessage = () => {
  const { message } = App.useApp();
  return message;
};

/**
 * 获取 Ant Design 的 modal API
 */
export const useModal = () => {
  const { modal } = App.useApp();
  return modal;
};

/**
 * 获取 Ant Design 的 notification API
 */
export const useNotification = () => {
  const { notification } = App.useApp();
  return notification;
};

